package com.udian.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.udian.domain.Userinfo;

@Repository("userinfoRepository")
public interface UserinfoRepository extends JpaRepository<Userinfo, Long> {
	
	Userinfo findByName(String name);
	
	
	Userinfo findByNameAndAge(String name, Integer age);
	
	
    @Query("from UserInfo u where u.name=:name")
    Userinfo findUserInfo(@Param("name") String name);
    
    
    
}